Signal Viewer
The Signal Viewer is used to analyze the behavior of signals after the test has been executed.
To open the Signal Viewer window:
- Select View | Signal Viewer or use the shortcut Ctrl+F12.
- In the Build Progress dialog, right-click on one or several test cases and select View Test Results, or click Open test results .
- To view the test results as well as the assessment results in the Signal Viewer, right-click on an assessment result in the Build Progress window and select Show Relevant Signals in Signal Viewer.
- In the Project view, right-click on one or several test cases and select Execution Data or Test Data. In the context menu, all execution configurations and platforms of the last executed tests in which the test case was executed are displayed.
In case you rerun a test case while the Signal Viewer is still open, you will be asked if you want to automatically update the test data. TPT will not change the display but update all data. The behavior of relevant signals can be observed.
In case you select No you can still update the data later by selecting File | Reload or pressing Ctrl+R. If you rerun tests and new tests are part of the test execution, you can drag the new test cases from the Build Progress window on the opened Signal Viewer window.
In the Signal Viewer window all signals are listed of the current test execution on the left, see Figure "Signal Viewer". On the right, customizable views display the values of selected signals over time.
The toolbar contains the following elements:
Import a signal file to the current tab; the additional signals are listed with the other signals in the signal table | |
Import a signal file in a new tab; | |
Save data to a file of the type CSV, TPTBIN, MAT, MDF, DAT, or MF4 | |
Open a new Signal Viewer window | |
Add view | |
Show state sequence information view | |
Zoom to fit | |
Show or hide legend in the view | |
Show or hide sample points for signals | |
Show or hide lines between sample points If hidden the signals is marked with a small empty rectangle. This rectangle does not represent any sample data. |
|
Show values next to the cursor | |
Show only one x-axis | |
Show a scrollbar if several views are visible | |
Lock signal or unlock signal to edit | |
Gaussian sample dragging | |
Show a table of the sample points | |
Show signals of the data type channel (input, output, local), parameter, measurement, assessment variable, assessment result channel, constants, and system constants, see Signal Viewer - Filter/Search Options. | |
Show those signals in the signal table that are selected | |
Show signals in the signal table whose value does not change during the test execution and that are neither constants nor system constants. | |
Show those signals in the signal table that are constant in the section between two cursors | |
Show condition tree, see Assesslets - Condition Tree | |
Load quick preferences. | |
Expand all folders within selected folder | |
Collapse all folders within selected folder |
A signal name or value listed in the Signal Viewer can be selected and copied for further processing. Select the column field and press Ctrl + C. This also works for multiple selection.
To change the color of signals displayed in the view, select the signal by activating the check box and click on the colored line.
By hovering over the assessment variable names listed in the Signal Viewer, a tooltip is displayed which provides detailed information, see Figure "Tooltip of an assesslet".
If you select a signal in any view and use shift + up/down arrow keys, the selected signal moves respectively up or down to a new view in the same tab.
In case of structured signals, use the left/right arrow keys to quickly open and close structured signals. Deselect the check box to remove the signal from the viewer.
Enter a time in the Time field to jump to it in the view. The appropriate values are automatically displayed in the signal table as well as in the view.
When you select Show/Hide lines between samples for signals to hide the lines, there is an empty point at the end of the signal. This point is only a marker to show you the signal's end. It has no value and it is also not represented in the sample point table, see Signal Viewer - Edit a Signal.
Signals can be exported by selecting File | Save as. Supported formats are CSV, TPTBIN, MAT, MDF, DAT, MF4. You can reuse the exported signals with an "Import signal" step in the step list.
More information about the Import signal step, see Step Type - Import signal.
Go to a signal definition in the step
Concerning local channels and output channels, you can right-click on the graphical representation of the signal and select Go to Definition of '<signal>' to jump to the step where this signal has been used.
This feature is available when selecting a test case that has been executed on several platforms, for example when you execute the test case TC_1
on the FUSION platform and on the EXE platform and open both execution results in one tab as in the screenshot below.
This feature is not available when selecting the results of different test cases, for example the results of TC_1
and TC_2
and place them in one Signal Viewer tab or when importing test execution results where the corresponding test cases are not available in the current TPT project.
X and Y axes
In a view, the X axis represents the time passed and the Y axis represents the values.
Two Y axes at once in a single view can be displayed. Select a signal in the signal table and drag it onto the right Y axis. You can also right-click into the view and select Add Signal to LEFT Axis or Add Signal to RIGHT Axis and choose a signal from the list.
Add new views
Several signals can be displayed in a single view or in different views.
To add a new view, right-click in the view and select Add View Above , Add View Below . You can also add a new view by dragging a signal onto the line between two views. A new view containing this signal will be placed between them.
Use the blue arrow buttons in any view to move and arrange the view. To add a new column next to the view, right-click in the view and select Add Column Left or Add Column Right. To remove the view or column, right-click and select Remove Column.
It is also possible to maximize a view using . The view will be enlarged to fit the complete Signal Viewer window. Click the button again to return to its previous size.
Select File|Clear viewer to reset the current Signal Viewer to just an empty view with standard filter options, or use shortcut Ctrl + E.
Use the second cursor
Click in the view to add a cursor in the graphic. Right-click in the view and select Show values next to cursors to activate or deactivate the display of the values next to cursor. If the value is of an enum type, the enum label is also shown.
A second cursor can be added. Right-click the graphic and select Toggle Second Cursor, or use shortcut Ctrl + click. When using the two cursors, the difference value between two points can be measured. It will be shown in the Time field in the upper left section of the Signal Viewer window.
Scroll a view
- click and drag any of the axis to move the axis in the selected direction (X or Y axis)
- Shift + drag over the view to move the representation
- Ctrl + left/right/up/down: scroll
Zoom a signal
- using the mouse wheel over the view to zoom in and out
- using the mouse wheel over any of the axes to zoom in and out in that axis
- double-click at the x axis to zoom to fit that axis, or right-click on the x axis and select Zoom x-axis to fit
- double-click at the y axis to zoom to fit that axis based on the min and max values within the
currently selected time interval, or right-click on the y axis and select Zoom y-axis to fit - Alt+drag over any of the axes to zoom in that axis
- Alt+drag to do a window zoom (zoom to region)
- click Zoom to fit , or use Alt+double-click to zoom to fit
Add a signal by copying a signal name
- Select a signal name.
- Press Ctrl + C to copy the signal name.
- Right-click in the view and select
Draw <"signal name">
, or press Ctrl + V.
To add more than one signal:
- Select a list of signal names separated by a comma.
- Press Ctrl + C to copy the list.
- Right-click in the view and select
Draw variables from clipboard
, or press Ctrl + V.
Copy the scaling from other axis
If the vertical axes in the view show different scales, the scaling from one axis to the other can be transferred, see Figure "Vertical axes with different scaling".
- Right-click on a axis and select Copy scaling from other Axis to transfer the scaling.
Conversion to decimal/binary/hexadecimal
By clicking on a desired point within the time line, the exact value of each signal at that point will be displayed in the respective value columns of the signal table. All scalar data types (int8, uint8, int16, uint16, int32, uint32, int64, uint64) can be converted from decimal to binary or hexadecimal.
Right-click on the value in the signal table and select the conversion format.
Show results for more than one test case
It is possible to show several test cases in the Signal Viewer window at the same time. In this case, the test results are shown in a series of tabs, one for each test case.
Select the desired test cases in the Build Progress dialog after the test execution. Click Open test results or right-click on the selected test case and click View Test Results or View Execution Results. Select Use different tabs.
To open a second instance of the Signal Viewer click Open a new Signal Viewer window in the toolbar.
Double-click on any tab name to show the respective test case in the Project view.
Whenever you execute the same group of tests again, the content of all tabs is automatically updated without any warning. In case you execute just one test case, no tabs are shown and a warning appears to indicate if you want to reload the view to update the changes.
To compare the signal behavior of different test cases, it is possible to display the results of several test cases in one Signal Viewer tab.
Select the test cases in the Build Progress dialog. Click Open test results or right-click on your selection and click View Test Results or View Execution Results. Select Use one tab.
For example, you select three test cases in the Build Progress dialog and display the results in one tab. As a result, all signals of the Declaration Editor are listed three times and can be distinguished by the automatically added number.
A signal with no additional number belongs to the first executed test case, the same signal with the extension _1
belongs to the second executed test case, and so forth.
If a signal has the value of zero, the signal was either zero, or zero is the default value of the signal specified in the Declaration Editor that has not been overwritten by another value in the test case.
If the value of a signal is n/a
(abbreviation for "not available"), there is no value available for the selected point in time. When the result of different test cases is displayed in one tab, the tab is named "various testcases".
Import a signal file
Files of the type CSV, TPTBIN, MAT, MDF, DAT, MF4, XLS, or XSLX can be imported in a new tab by clicking Import a signal file in a new tab or in the current tab by clicking Import the signal file to the current tab . If you choose the latter, the signals are inserted in the signal table of the current view.
Show partially undefined signals (n/a)
The Signal Viewer can also handle signals that are partially undefined. Only the defined sections of the signal are represented. Hover over the selected signal in the signal table to see the values where the signal is defined.
Compare partially undefined signals (n/a)
When using Signal Comparison assesslets, partially undefined signals (n/a
) are compared as follows:
Signal | Reference signal | Result |
---|---|---|
value | value | difference value (_diff or _diffToRef ) |
value | n/a | n/a |
n/a | value | 0.0 |
n/a | n/a | 0.0 |
For example, signal_b
is compared to signal_b_ref
which includes partially undefined signals. The value of the assessment variables with the name suffix _diff
and _diffToRef
results in n/a
, see Figure "Compare defined and undefined signals".
Switching interpolation modes
The Signal Viewer provides different algorithms for displaying the space between two sample points of a signal. It is possible to select between Linear or Hold last value interpolations.
Hold last value
A sample's value is considered valid until a subsequent sample is reached.
Linear
The values of a sample and its successor are interpolated in a linear way.
To change the interpolation mode, select a signal and click Interpolation in the menu bar.
There are two types of preferences, which can be saved and loaded:
Preferences
Managed at File | Save Preferences or File | Load Preferences.
Quick Preferences
Managed at File | Quick Preferences.
Both preferences save the same settings:
- the different views, as well as the size and also which signals are drawn
- zoom settings for X and Y axes
- the position of the cursor
- the colors or representations of the drawn signals
- the current condition tree
- buttons in the toolbar:
- show/hide legends drawn in viewers
- show/hide sample points for signals
- show/hide lines between samples for signals
- show values next to cursor
- show only one x-axis
- lock signal edit
- Gaussian sample dragging
- all filter settings
- filter the table for signals that are currently drawn
- show constant signals
- show signals that are constant between the two cursors
However, while the Preferences are saved in a TPTVIEWERPREF file, the Quick Preferences are associated with the current TPT file and are loaded whenever you open the respective TPT file.
You can save up to five different Quick Preferences. To save one of them use the shortcut Ctrl + Shift + 1, 2, ... or 5, to load Ctrl + 1, 2, ... or 5.
Load Signal Viewer preferences from the command line
You can load a TPTVIEWERPREF file together with a signal file of the type TPTBIN or TPTZ by using the command line.
- Change in the command line to the TPT installation directory.
- Enter
tpt.exe <path to your file>\<name>.tptviewerpref <name>.tptbin
or entertpt.exe <path to your file>\<name>.tptviewerpref <name>.tptz